using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Nuwanda.TfsSpotlight.Services.Interfaces;
using Nuwanda.TfsSpotlight.Shell.Services.Interfaces;
using Nuwanda.TfsSpotlight.TFS;
using Nuwanda.TfsSpotlight.Views.Query;
using Nuwanda.TfsSpotlight.Views.WorkItems;

namespace TfsSpotlight.Tests.Views
{
    public class QueryPresenterTestableStub : QueryPresenter
    {
        public QueryPresenterTestableStub(IQueryView view, 
                                          IMonitService monitService, IMenuService menuService, 
                                          ITabsService tabsService,IUserSettingsService userSettingsService,
                                          IWorker worker, ILogger logger,
                                          IEmbeddedWorkItemPresenter embeddedWorkItemPresenter,
                                          ITfsServerRepository tfsServerRepository)
            : base(view, monitService, menuService, tabsService, userSettingsService,
                   worker, logger, tfsServerRepository)
        {
            this.EmbeddedWorkItemPresenter = embeddedWorkItemPresenter;
        }

        public bool Test_IsActive
        {
            set { this.IsActive = value; }
        }

        private WorkItem _selectedWorkItem;
        protected override WorkItem GetSelectedWorkItem()
        {
            return this._selectedWorkItem;
        }

        public void Test_ReturnFromGetSelectedWorkItem(WorkItem returnValue)
        {
            this._selectedWorkItem = returnValue;
        }

        public ITfsServerManager Test_ServerManager
        {
            get { return this._tfsServerManager; }
            set { this._tfsServerManager = value; }
        }
    }
}